-- lua/plugins/init.lua - 插件管理器初始化

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "https://github.com/folke/lazy.nvim.git",
        "--branch=stable", -- 最新稳定版
        lazypath,
    })
end
vim.opt.rtp:prepend(lazypath)

-- 加载插件配置
require("lazy").setup({
    -- 插件列表将在这里配置
    spec = {
        { import = "plugins.lsp" },
        { import = "plugins.lualine" },
        { import = "plugins.cmp" },
        { import = "plugins.treesitter" },
        { import = "plugins.neo-tree" },
        { import = "plugins.comment" },
        { import = "plugins.autopairs" },
        { import = "plugins.catppuccin" },
        -- { import = "plugins.telescope" },
        -- { import = "plugins.nvim-tree" },
        -- 其他插件配置
    },
    defaults = {
        lazy = false, -- 默认为懒加载
    },
    checker = {
        enabled = true, -- 自动检查插件更新
    },
})
